package com.qfjy.homework.xuhuiqianpai;

/**
 * @author: xh
 * @date: 2022/11/10 19:17
 * @version: 1.0
 */

import java.math.BigDecimal;

/**
 * TODO 策略二：老用户  --  九折
 */
public class OldCustomActualPayment implements Payable{

    @Override
    public BigDecimal payPrice(BigDecimal price) {
        System.out.println("老用户打九折");
        price = price.multiply(new BigDecimal(0.9)).setScale(2,BigDecimal.ROUND_HALF_UP);
        return price;
    }
}
